<?php
defined ( 'INDEX_MODELS' ) || define ( 'INDEX_MODELS', dirname ( __FILE__ ) . '/../models/' );
class IndexController extends Zend_Controller_Action {
	
	public function init() {
		/* Initialize action controller here */
	}
	
	public function indexAction() {
		// action body
		require INDEX_MODELS . '/index/ShowModels.php';
		$index['index_main_showmodels_obj'] = new ShowModels( );
		$index['index_main_showmodels'] = $index['index_main_showmodels_obj']->getmodel();
		$index['index_main_showmodels_array'] = "'".implode("','",$index['index_main_showmodels']['menumodels']['itemname'])."'";
        $this->view->assign($index);
		
		echo $this->view->render ( 'index/index.html' );
	
	}
	public function mainAction() {
		require INDEX_MODELS . '/index/main/Index_Main_Msg.php';

		$main['index_main_msg_obj'] = new Index_Main_Msg ( );
		$main['index_main_msg'] = $main['index_main_msg_obj']->getconfig();
		$main['index_main_msg_xml_obj'] = new Zend_Config_Xml ( APPLICATION_PATH . '/configs/main.xml' );
		$main['index_main_msg_xml'] = $main['index_main_msg_xml_obj']->toArray ();
		
	    $this->view->assign ( $main );
		echo $this->view->render ( 'index/main.html' );
	
	}
	public function dispatcherAction(){
	    require INDEX_MODELS . '/index/action/Index_Action_Do.php';
	    $db = Zend_Registry::get('db');
	    $dispatch['obj'] = new Index_Action_Do($this,$db);
	
	
	}

}

